function reward_add_back(){
		$("#reward_add").hide();
		$("#reward_list").fadeIn();
	
}

function reward_add_submit(){
	var type = $("#reward_add_type").val();
	var name= $("#reward_add_name").val();
	var detail = $("#reward_add_detail").val();
	var deal = $("#reward_add_deal").val();
	var date = $("#reward_add_date").val();
	
	if(type == ""){
		$("#reward_add_error").html("类型不能为空！");
		return ;
	}
	if(name == ""){
		$("#reward_add_error").html("姓名不能为空!");
		return ;
	}
	if(detail == ""){
		$("#reward_add_error").html("简述不能为空!");
		return ;
	}
	if(deal == ""){
		$("#reward_add_error").html("处理方式不能为空!");
		return ;
	}
	if(date == ""){
		$("#reward_add_error").html("日期不能为空!");
		return ;
	}
	$.ajax({
		url : "reward/addReward.sls",
		data : {"type":type,"name":name,"detail":detail,"deal":deal,"date":date},
		type : "post",
		dataType : "json",
		success : function(result){
			if(result.status == 0){
				$("#reward_add_error").html("信息添加成功！");
				setTimeout(function(){window.location.href="toReward.sls";},1000);
			}else if(result.status == 1){
				$("#reward_add_error").html("添加失败！");
			}else {
				$("#reward_add_error").html("系统出错！");
			}
		},
		error : function(){
			window.location.href="error.sls";
		}
	});
	
}